#ifndef CONFIGFORM_H
#define CONFIGFORM_H

#include <QWidget>
#include <QIcon>
#include <QTimer>
#include <QMessageBox>

#include "qcustomplot.h"
#include "datapack.h"
#include "msgparse.h"
namespace Ui {
class ConfigForm;
}




class ConfigForm : public QWidget
{
    Q_OBJECT

public:
    explicit ConfigForm(QWidget *parent = nullptr);
    ~ConfigForm();

    void setupRealtimeDataDemo(QCustomPlot *customPlot);


signals:
    //void serialWriteMsg(DataPack *data);
    void serialWriteData(uint8_t *data,int len);    // 串口数据接受的槽函数

private slots:
    //void serialReadData(char *data,qint64 len);
    void serialReadMsg(DataPack *data);             // 串口数据接受的槽函数

    void on_magStartBtn_clicked();

    void on_windStartBtn_clicked();

    void on_clearnBtn_clicked();

private:
    Ui::ConfigForm *ui;

    float linA=0,linB=0,linC=0;
    bool getDataNewFlag=false;  // 接收ok的buff标志
};

#endif // CONFIGFORM_H
